package xj.graph2d;

public class ModelLabelListener implements LabelListener {

  public ModelLabelListener() {
  }

  public ModelLabelListener(ModelListener modelListener) {
    this.modelListener = modelListener;
  }

  @Override
  public Object clone() throws CloneNotSupportedException {
    return super.clone();
  }

  public void setModelListener(ModelListener modelListener) {
    this.modelListener = modelListener;
  }

  public void labelChanged(Label label) {
    System.out.println("ModelLabelListener.labelChanged()");

    if (label != null && modelListener != null) {
      modelListener.updateModel();
    }
  }

  protected ModelListener modelListener;

}
